<%--
  Created by IntelliJ IDEA.
  User: 14496
  Date: 2018/12/7
  Time: 11:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="java.util.Calendar" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<jsp:useBean id="now" class="java.util.Date" />
<html>
<head>
    <jsp:include page="../../includes/framework-headers.jsp"/>
    <jsp:include page="../../includes/framework-navbar-student.jsp">
        <jsp:param name="navSelection" value="1-2"/>
    </jsp:include>

    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/components/notify.almost-flat.min.css">
    <script src="${pageContext.request.contextPath}/js/uikit/components/notify.min.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/components/datepicker.almost-flat.min.css">
    <script src="${pageContext.request.contextPath}/js/uikit/components/datepicker.min.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/components/form-select.almost-flat.min.css">
    <script src="${pageContext.request.contextPath}/js/uikit/components/form-select.min.js"></script>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/components/accordion.min.css">
    <script src="${pageContext.request.contextPath}/js/uikit/components/accordion.min.js"></script>

    <script src="${pageContext.request.contextPath}/js/student/student_management.js"></script>
    <script src="${pageContext.request.contextPath}/js/student/modify_student.js"></script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.17.0/jquery.validate.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.17.0/additional-methods.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/jquery_plugins/jquery.serializejson.js"></script>

    <title>毕业设计指导网站 - 用户信息管理</title>
</head>
<body>
<div class="gpg-middle">
    <div class="uk-container uk-container-center">
        <div class="uk-grid" data-uk-grid-margin>
            <jsp:include page="../../includes/framework-nav-panel-student.jsp">
                <jsp:param name="navSelection" value="4-1"/>
            </jsp:include>
            <div class="uk-width-medium-3-4">
                <!-- 主体内容 -->
                <article class="uk-article">
                    <h1 class="uk-article-title">用户信息</h1>
                    <div class="uk-align-right">
                        <button class="uk-button uk-button-success" id="btn_submit" onclick="searchStudent()">检索</button>
                    </div>
                    <hr>
                    <div class="uk-overflow-container">
                        <input type="number" id="account_index" hidden>
                        <form class="uk-form uk-margin" id="form_account_info">
                            <fieldset>
                                <div class="uk-grid" data-uk-margin id="account_data">

                                    <div class="uk-width-medium-1-2">
                                        <label class="uk-form-label" for="account_user_type">用户类型</label>
                                        <div class="uk-form-controls">
                                            <select name="userType" class="uk-width-1-1" id="account_user_type" disabled>
                                                <option value="S">学生</option>
                                            </select>
                                        </div>
                                    </div>

                                </div>
                            </fieldset>
                        </form>

                        <hr class="uk-grid-divider">

                        <form class="uk-form uk-margin" id="form_student_info">
                            <fieldset>

                                <div class="uk-grid" data-uk-margin id="student_profile">
                                    <div class="uk-width-medium-1-2">
                                        <label class="uk-form-label" for="student_no">学号</label>
                                        <div class="uk-form-controls">
                                            <input name="studentNumber:string" class="uk-width-1-1" type="text" id="student_no" maxlength="10" disabled>
                                        </div>
                                    </div>

                                    <div class="uk-width-medium-1-2">
                                        <label class="uk-form-label" for="student_name">姓名</label>
                                        <div class="uk-form-controls">
                                            <input name="name:string" class="uk-width-1-1" type="text" id="student_name" maxlength="50">
                                        </div>
                                    </div>

                                    <div class="uk-width-medium-1-2">
                                        <label class="uk-form-label" for="student_birth_date">出生日期</label>
                                        <div class="uk-form-controls">
                                            <input name="birthDate:string" class="uk-width-1-1" type=""
                                                   id="student_birth_date"
                                                   data-uk-datepicker="{weekstart: 0, format: 'YYYY-MM-DD', maxDate: 0}">
                                        </div>
                                    </div>

                                    <div class="uk-width-medium-1-2">
                                        <label class="uk-form-label" for="student_gender">性别</label>
                                        <div class="uk-form-controls">
                                            <select name="gender:string" class="uk-width-1-1" id="student_gender">
                                                <option value="M">男</option>
                                                <option value="F">女</option>
                                            </select>
                                        </div>
                                    </div>

                                    <div class="uk-width-medium-1-2">
                                        <label class="uk-form-label" for="student_id_number">身份证号码</label>
                                        <div class="uk-form-controls">
                                            <input name="idNumber:string" class="uk-width-1-1" type="text" id="student_id_number" maxlength="18">
                                        </div>
                                    </div>

                                    <div class="uk-width-medium-1-2">
                                        <label class="uk-form-label" for="student_phone">手机号码</label>
                                        <div class="uk-form-controls">
                                            <input name="phone:string" class="uk-width-1-1" type="tel" id="student_phone">
                                        </div>
                                    </div>

                                    <div class="uk-width-medium-1-2">
                                        <label class="uk-form-label" for="student_department">专业</label>
                                        <div class="uk-form-controls">
                                            <select name="departmentId:number" class="uk-width-1-1" id="student_department">
                                                <jsp:include page="../shared/department_options.jsp"/>
                                            </select>
                                            <%--<input name="student[departmentId]:number" class="uk-width-1-1" type="text" id="student_department">--%>
                                        </div>
                                    </div>

                                    <div class="uk-width-medium-1-2">
                                        <label class="uk-form-label" for="student_enrollment_year">入学年份</label>
                                        <div class="uk-form-controls">
                                            <select name="enrollmentYear:number" class="uk-width-1-1" id="student_enrollment_year">
                                                <c:forEach var="year" begin="${now.year + 1890}" end="${now.year + 1899}" step="1">
                                                    <option value="${year}">${year}</option>
                                                </c:forEach>
                                                <option value="${now.year + 1900}" selected>${now.year + 1900}</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                            </fieldset>
                        </form>
                    </div>
                    <div class="uk-modal-footer uk-text-right">
                        <button type="button" class="uk-button uk-button-primary" id="btn_save_account" onclick="onAccountSave()">保存</button>
                    </div>

                </article>
            </div>
        </div>
    </div>
</div>
</body>
</html>
